@sachaamm wrote:
Hi there,
My question is simple how to use ofGLRenderer in my sketch ?
All i want is to draw a triangle with OpenGL.#pragma once #include "ofMain.h" class ofApp : public ofBaseApp{ public: void setup(); void update(); void draw(); void keyPressed(int key); void keyReleased(int key); void mouseMoved(int x, int y ); void mouseDragged(int x, int y, int button); void mousePressed(int x, int y, int button); void mouseReleased(int x, int y, int button); void mouseEntered(int x, int y); void mouseExited(int x, int y); void windowResized(int w, int h); void dragEvent(ofDragInfo dragInfo); void gotMessage(ofMessage msg); ofGLRenderer glr; };
ofApp.cpp
#include "ofApp.h" //-------------------------------------------------------------- void ofApp::setup(){ } //-------------------------------------------------------------- void ofApp::update(){ } //-------------------------------------------------------------- void ofApp::draw(){ glr.drawTriangle(0, 0, 0, 1, 1, 1, 2, 2, 2); }
I get (VS2015)
C2280 'ofApp::ofApp(void)': attempting to reference a deleted function
Can I get some explanations to it ? How to call properly ofGLRenderer function , as drawTriangle() ? Where I can find documentation about using OF with OpenGL ?Thanks !!!!!
Posts: 2
Participants: 3