Programming and animation
Programming and animation ideas, articles, tutors, scripts, plugins in the 3d-
GLSL shaders tips: NVidia and AMD difference.
Posted on 29 May 2010 Neill No commentsOn my personal experience in adaptation glsl shaders to AMD.I wrote “adaptation”, because this process can not be called in another manner, after setting up under the NVidia card.1) AMD does not like ARB_draw_buffers require flag in the shader. And if you do not specify any flag at all, shader compiles without any problems. But NVidia gives me a warning that I should include this flag to work with MRT.When the Cg shaders, there is another story, you need a ATI_draw_buffers flag.http://developer.nvidia.com/forums/index.php?showtopic=2572
http://developer.nvidia.com/forums/index.php?showtopic=2703&st=0&gopid=7686&#entry7686
2) AMD swears the presence sampler2DRect and sampler2D in one shader. Also from the category of “not paying attention” on such a warning.Graphics, Miscellaneous GLSL, OpenGL, shaders, Tips -
OpenGL 3.3 and OpenGL 4.0
Posted on 14 March 2010 Neill No comments
The Khronos Group announced the release of the OpenGL® 4.0 specification. This is a significant update to the most widely adopted 2D and 3D graphics API, and includes the GLSL 4.00 update to the OpenGL Shading language allowing developers to access the latest generation of GPU acceleration. Here is a specification - http://www.opengl.org/registry/
Miscellaneous 2010, News, OpenGL, overview -
Моя первая публикация
Posted on 26 February 2010 Neill No commentsThis article is not avaliable in english.
Недавно нашел у себя на компьютере весьма памятный мне материал – текст брошюры, которая продавалась в моем городе на рынке в книжной лавке. Это был октябрь 2000 года и мне тогда было 14 лет отроду.
Материал был написан на основе своего опыта работы с библиотекой OpenGL и разработкой проекта “Автомобиль в движении”. Как это всё было тогда наивно, но по своему загадочно и величественно на то время. В общем это было начало начал так сказать.
Graphics, Programming Delphi, OpenGL -
OpenGL вне зависимости от платформы или SDL
Posted on 26 February 2010 Neill No commentsThis article is avaliable only in russian.
В виду того, что статья OpenGL для Win32 пользуется популярностью, я решил выложить еще несколько глав из когда-то намечавшейся книги по OpenGL и компьютерной графике. Материал еще имеет определенную актуальность, особенно для начинающих.
OpenGL – открытая графическая библиотека для работы с двухмерной и трехмерной графикой. Главной особенностью можно считать то, что она поддерживается практически всеми операцинными системами. Тем самым давая возможность обладателям Windows, Linux, MacOs и др. операционных систем творить свои трехмерные шедевры, в отличие от DirectX, который написан только под Windows. Однако в каждой операцинной системе инициализация OpenGL проводится по своему. Я мог бы конечно рассказать вам об этом, но главная цель моей книги – это показать новые возможности OpenGL с использованием современных видеокарт, поэтому для инициализации мы будем использовать библиотеку SDL. Это кросс платформенный мультимедийный API или иными словами, с помощью этой библиотеки мы сможем, будь-то Windows, Linux или MacOS, работать с графикой, клавиатурой и мышкой, таймером, событиями и т.д. Так что изучение OpenGL не будет зависеть от выбора операционной системы.
Для начала ознакомимся с этой библиотекой и её возможностями. Я расскажу только о том, что нам потребуется в дальнейшей работе.
Graphics, Programming OpenGL, SDL -
GLSL shaders notes
Posted on 9 November 2009 Neill No commentsIn the course of work with the GLSL shaders I have a few helpful notes on compatibility:
1) # version 120 – a string indicating the version of the shader should be the first in the code, otherwise ATI swears at compile time. I have this error was the result of the shader assembly of parts.2) most of the old ATI and INTEL cards do not support glsl shaders, instead they have only enhance GL_ARB_VERTEX_PROGRAM, GL_ARB_FRAGMENT_PROGRAM. Out here there is very concise – download library CG from NVidia and recompile the shaders into the arb programs.
For example: cgc-glsl shader.glsl-profile arbvp1-o vertex.vp
In this case, profile arbvp1 for vertex programs and arbfp1 – for the fragment.
3) The emergence glsl shaders, command glGetString complemented with new possible argument GL_SHADING_LANGUAGE_VERSION, which returns the version of the glsl shader.
4) Remember that NVidia has a very useful utility ShaderPerf – analysis of the number of shader instructions, and the speed of execution, as well as sweep shader performance for different video cards and a family of graphics NVidia chipsets. There is also an opportunity to compare the performance of two different shaders to each other.
5) Do not specify real numbers with f at the end as 1.0f, simply write 1.0. Also, ATI is very picky to the writting a real number with no fractional part.
6) Useful utility OpenGL Extension Viewer with a database of support OpenGL extensions for most video cards. http://www.realtech-vr.com/glview/
Graphics, Programming GLSL, OpenGL, Tips -
Tuning 3d engine for a Opera, Mozilla, Chrome
Posted on 3 November 2009 Neill 1 commentMy online browser-based technology for applications previously worked only under IE as a component ActiveX. Now I could write a plugin using NPAPI (application programming interface for a family of Netscape browsers), enabling the engine to run in such browsers as Opera, Mozilla, Chrome. So expect a new 3d graphics player and online 3d tuning in the nearest future.
Miscellaneous ActiveX, Browser, Car, Online, OpenGL -
GLSL error – pre-mature EOF
Posted on 25 September 2009 Neill No commentsAt a ATI video cards shaders refuse to compile reference to this error. The reason – comments in Russian.
Graphics, Programming GLSL, OpenGL, Tips -
VBO tips and tricks
Posted on 15 September 2009 Neill No commentsUntil now, the moment I took some of the stereotypes about how to draw the geometry means OpenGL, which after a series of tests had to be overcome.
Graphics, Programming C++, OpenGL, Tips, VBO -
GLSL: missing uniform location
Posted on 9 September 2009 Neill No commentsI have faced with such a feature of the GLSL compiler. If the variable is not used in the shader, then find its location there would be no possibility, it is simply truncated from the shader.
The search function on behalf of the Uniform position.
int loc = glGetUniformLocationARB (, ); Moreover, even if caught insidious, like the variable is used, but the result of further calculations is not, and that’s why, again, to find the ancestral variable is not possible.
Graphics, Programming C++, GLSL, OpenGL -
How to: draw scene with camera background in a FBView
Posted on 12 August 2009 Neill No commentsThis is the forum question from Autodesk Area, so I will add it to the tips for OpenReality SDK:
You can operate with camera background by using property BackGroundColor.
So to get color at current frame:
FBColor color = lCamera.BackGroundColor;
Now we have to set clear color using OpenGL command:glClearColor( color[0], color[1], color[2], color[3] );
MotionBuilder, Programming C++, OpenGL, OpenReality, SDK, Tips




English
Russian
Recent Comments