Click here to Skip to main content
15,886,830 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: List control in FormView Pin
hellogany20-Apr-10 22:51
hellogany20-Apr-10 22:51 
QuestionRemove menu Pin
john563220-Apr-10 20:20
john563220-Apr-10 20:20 
QuestionRetransmission timeout and Persist timeout Problem Pin
suchithrac20-Apr-10 18:46
suchithrac20-Apr-10 18:46 
AnswerRe: Retransmission timeout and Persist timeout Problem Pin
@Intersect☺™20-Apr-10 20:29
professional@Intersect☺™20-Apr-10 20:29 
Questionpassing variables to GLSL Pin
James_72220-Apr-10 18:28
James_72220-Apr-10 18:28 
QuestionRe: passing variables to GLSL Pin
CPallini20-Apr-10 20:27
mveCPallini20-Apr-10 20:27 
AnswerRe: passing variables to GLSL Pin
James_72220-Apr-10 20:36
James_72220-Apr-10 20:36 
AnswerRe: passing variables to GLSL Pin
cmk20-Apr-10 22:13
cmk20-Apr-10 22:13 
Been a couple years but IIRC ...

If you have a vertex shader with:
attribute float myAttrib;

Then in the C++ source you would:
GLint loc = glGetAttribLocation(progId, "myAttrib");
or,
GLint loc = 20;
glBindAttribLocation(progId, loc, "myAttrib");

then to set myAttrib,
glVertexAttrib1f(loc, 0.432);

So you can set per-vertex in C++ and read (only) in shader.
... uniforms are similar.

If you want to bind then do so after glAttachShader and before glLinkProgram.

I think OpenGL 3+ changes the above slightly, haven't gotten up to speed on it yet.
...cmk

The idea that I can be presented with a problem, set out to logically solve it with the tools at hand, and wind up with a program that could not be legally used because someone else followed the same logical steps some years ago and filed for a patent on it is horrifying.
- John Carmack

GeneralRe: passing variables to GLSL Pin
James_72221-Apr-10 2:03
James_72221-Apr-10 2:03 
AnswerRe: passing variables to GLSL [modified] Pin
cmk21-Apr-10 8:06
cmk21-Apr-10 8:06 
Questionrelease mode crashes when creating tool bar Pin
rayjoslyn20-Apr-10 11:42
rayjoslyn20-Apr-10 11:42 
AnswerRe: release mode crashes when creating tool bar Pin
Stephen Hewitt20-Apr-10 14:55
Stephen Hewitt20-Apr-10 14:55 
AnswerRe: release mode crashes when creating tool bar Pin
Alan Balkany21-Apr-10 4:13
Alan Balkany21-Apr-10 4:13 
Questionunexpected exception type idification Pin
aklauzov20-Apr-10 10:08
aklauzov20-Apr-10 10:08 
AnswerRe: unexpected exception type idification Pin
Gwenio20-Apr-10 11:20
Gwenio20-Apr-10 11:20 
QuestionMouse scroll wheel Pin
DanYELL20-Apr-10 9:55
DanYELL20-Apr-10 9:55 
AnswerRe: Mouse scroll wheel Pin
Michel Godfroid20-Apr-10 11:17
Michel Godfroid20-Apr-10 11:17 
AnswerRe: Mouse scroll wheel Pin
@Intersect☺™20-Apr-10 20:51
professional@Intersect☺™20-Apr-10 20:51 
QuestionHow to read a txt file in Windows CE (C++) Pin
Software200720-Apr-10 8:39
Software200720-Apr-10 8:39 
AnswerRe: How to read a txt file in Windows CE (C++) Pin
Eugen Podsypalnikov20-Apr-10 9:04
Eugen Podsypalnikov20-Apr-10 9:04 
GeneralRe: How to read a txt file in Windows CE (C++) Pin
Software200720-Apr-10 9:20
Software200720-Apr-10 9:20 
QuestionRe: How to read a txt file in Windows CE (C++) Pin
David Crow20-Apr-10 9:19
David Crow20-Apr-10 9:19 
QuestionWhy does this dode fail injection? Pin
rain-1320-Apr-10 6:51
rain-1320-Apr-10 6:51 
AnswerRe: Why does this dode fail injection? Pin
«_Superman_»20-Apr-10 7:37
professional«_Superman_»20-Apr-10 7:37 
GeneralRe: Why does this dode fail injection? Pin
rain-1320-Apr-10 8:14
rain-1320-Apr-10 8:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.