1

Topic: OpenGL

Prompt, somehow it is possible to use  without glew? I look examples on the Internet, everywhere glew it is used.

2

Re: OpenGL

Hello, CEMb, you wrote: CEM> Prompt, somehow it is possible to use  without glew?  are not connected in any way with glew. Therefore, of course, to use them it is possible and without glew. Simply you take and you use. The library glew is necessary absolutely for another - to automate access to extensions and new versions OpenGL for a case when the program  with older version OpenGL. However, it just a typical situation and consequently such library also appeared (and at all one). CEM> I Look examples on the Internet, everywhere glew it is used. Well so good library. Certainly it use that manually with calls??? GetProcAddress not to toil.

3

Re: OpenGL

Hello, watchmaker, you wrote: CEM>> Prompt, somehow it is possible to use  without glew? W> Shejdery are not connected in any way with glew. Therefore, of course, to use them it is possible and without glew. It is clear, but everywhere examples where with the help glew all is compiled,  etc. W> Simply take and use. How? Where to look at examples? W> the library glew is necessary absolutely for another - to automate access to extensions and new versions OpenGL for a case when the program  with older version OpenGL. However, it just a typical situation and consequently such library also appeared (and at all one). CEM>> I Look examples on the Internet, everywhere glew it is used. W> well so good library. Certainly it use that manually with calls??? GetProcAddress not to toil. Yes, by sight well, but the superstructure would be desirable to try bases, and glew.

4

Re: OpenGL

5

Re: OpenGL

6

Re: OpenGL

CEM> And glew it is possible statically  not to drag behind itself superfluous dll? It is possible, already I see.

7

Re: OpenGL

W>> that does All glew so it simply checks system version OpenGL and loads through??? GetProcAddress all those functions which there , but thus are not declared in client library. Loads, naturally, under a subject names that the program code should not be changed. Well that is glCreateShader can be both the present function, and the pointer on function. But, fortunately, for high-level languages this distinction is absolutely insignificant - you simply write in the code glCreateShader (ShaderType), and the compiler itself understands as it to cause. glewinfo showed that all functions up to version 3.0 are. Whence it their beret? Probably, I not about all  know

8

Re: OpenGL

Hello, CEMb, you wrote: CEM> I look in system opengl32.dll, at it in the export table was not present glCreateShader. It is possible to consider that opengl32.dll is a client interface of library. Used heading files (or that there is in yours ) should be coordinated with it. In windows any archaic version (like 1.1) there lies. This client only also is able that  calls or in the videocard driver, or in the code of program emulation, or on other computer (theoretically). And already on that end there is a present server which executes these commands. And it, probably, completely not ancient OpenGL1.1, and something is better. But direct access to its possibilities opengl32.dll does not give, as about them does not know. And access can be received through the same call wglGetProcAddress - it leaves in the server, and if the given functionality is supported by the server, returns the appropriate address of function. CEM> how to learn version OpenGL? glGetString (GL_VERSION);

9

Re: OpenGL

CEM>> And glew it is possible statically  not to drag behind itself superfluous dll? CEM> It is possible, already I see.  statically. By a call of functions from glew the code springs in storage where all is hammered by zero though there on idea, there should be a library code glew32sd. What do I do not so? upd: springs on zero offset. v = glCreateShader (GL_VERTEX_SHADER); 00AD3293 mov esi, esp 00AD3295 push 8B31h 00AD329A call dword ptr [___ glewCreateShader (0B43648h)] 00AD32A0 cmp esi, esp 00AD32A2 call @ILT+1125 (__ RTC_CheckEsp) (0ACB46Ah) 00AD32A7 mov dword ptr [v], eax i.e. to ___ glewCreateShader address, 0x0B43648 - zero

10

Re: OpenGL

Hello, CEMb, you wrote: CEM> That I do not so? And what you do? You suggest to guess? smile Well check up then that there is the active context; that glewInit () returned; to that GLEW_VERSION_2_0 it is equal.

11

Re: OpenGL

Hello, watchmaker, you wrote: CEM>> That I do not so? W> And what you do? You suggest to guess? Well, I suspect, can somehow not so collected with static ? There is by sight a normal jump table of functions, but all it conducts in zeroes. Looked interiors glew32sd.lib, by sight like all apprx. W> Well check up then W> W> that there is the active context; W> that glewInit () returned; W> to that GLEW_VERSION_2_0 it is equal. W> 1. Yes, it was generally earlier operating application on openGL, I simply decided to attach  2. 1 3. 0

12

Re: OpenGL

Hello, watchmaker Esteemed  notes. Probably I not so used the assembly  for static . Had not time to check up, I will try correctly  in the evening.

13

Re: OpenGL

Hello, CEMb, you wrote: W>> Well check up then W>> 2. That glewInit () returned; CEM> 2. 1 It follows from this that you here deceive: W>> 1. That there is the active context; CEM> 1. Yes, wink

14

Re: OpenGL

Hello, watchmaker, you wrote: W>>> Well check up then W>>> 2. That glewInit () returned; CEM>> 2. 1 W> It follows from this that you here deceive: W>>> 1. That there is the active context; CEM>> 1. Yes, W>) well wglCreateContext fulfilled successfully. It and worked earlier. Remains glewInit (), I looked that returned in eax, there was 01. And in what the contradiction? 1 is fail? And how the active context is connected to initialization glew? It earlier without glew normally formed. Not, I think, matter is not in initialization, and in the assembly: there, where there should be a code glew - there zero. I the last minutes before leaving esteemed  notes, there is told that for a statics it is necessary most  to add source codes in the project, I did not do it.

15

Re: OpenGL

Hello, watchmaker, you wrote: W>>> Well check up then W>>> 2. That glewInit () returned; CEM>> 2. 1 W> It follows from this that you here deceive: W>>> 1. That there is the active context; CEM>> 1. Yes, W>) Is not present, matter is not in the assembly. Tried dll - the same situation. I will not understand why. glewInit falls here: s = getString (GL_VERSION); returns null, it is called from opengl32.dll That can be not so? Why empty version OpenGL? At this application without glew works, all is drawn.

16

Re: OpenGL

Hello, watchmaker, you wrote: Everything, earned That was: I everywhere at context usage after removed accurately it: wglMakeCurrent (m_hdc, m_hglrc);//affairs did wglMakeCurrent (nullptr, nullptr); the code wrote it for a long time, therefore not at once paid attention. Simply checked up that m_hglrc forms and not zero. Such affairs of thanks!