Search found 63 matches

by papillon68
Fri Nov 30, 2018 10:02 pm
Forum: C++ Development
Topic: wxThread and OpengL
Replies: 7
Views: 100

Re: wxThread and OpengL

OpenGL was not designed with multithread on sight. Internally the hardware will split the task into several "paths". But externally only a thread can use gl-commands in a current gl-context So, if you want your thread to execute some gl-stuff then call wxGLCanvas::SetCurrent() or wxGLCont...
by papillon68
Thu Nov 29, 2018 7:11 pm
Forum: C++ Development
Topic: wxThread and OpengL
Replies: 7
Views: 100

Re: wxThread and OpengL

Right so best course of action is to move to VBO so that I can run threads to prepare and collect vertex data and later l, when threads have ran off, or bind the buffer?
by papillon68
Thu Nov 29, 2018 6:10 pm
Forum: C++ Development
Topic: wxThread and OpengL
Replies: 7
Views: 100

wxThread and OpengL

Hello, I am experimenting with the thread sample provided and I ran into an issue that I can't seem to figure out. Basically the creation of an openGL display list executed in the thread entry code is invalid, issuing a generic " invalid OpenGL error 1282 ". Here is how I modified the code...
by papillon68
Sun Oct 07, 2018 12:18 pm
Forum: C++ Development
Topic: Dataview sample: adding items question [SOLVED]
Replies: 8
Views: 489

Re: Dataview sample: adding items question [SOLVED]

Just an update that I managed to fix things the way I wanted. From what I could understand, a wxDataViewCtrl doesn't allow to create a tree of items, it just allows only 1 level. So what I did was to append containers, which can be nested one to another. By overriding the HasContainerColumns functio...
by papillon68
Fri Oct 05, 2018 7:53 pm
Forum: C++ Development
Topic: Dataview sample: adding items question [SOLVED]
Replies: 8
Views: 489

Re: Dataview sample: adding items question [SOLVED]

To append to the selected item then: MyTreeCrownModelNode *node = (MyTreeCrownModelNode*)item.GetID(); wxLogMessage("selected item ID: %s", node->m_crownLayerID); // check the selected item ID, which is OK // CHANGES: MyTreeCrownModelNode *m_addThis = new MyTreeCrownModelNode(node, crownL...
by papillon68
Fri Oct 05, 2018 5:12 pm
Forum: C++ Development
Topic: Dataview sample: adding items question [SOLVED]
Replies: 8
Views: 489

Re: Dataview sample: adding items question [SOLVED]

Manolo wrote:Where do you want to append the new node, to the hidden m_root or to the selected item?


To the selected item.
by papillon68
Fri Oct 05, 2018 3:33 pm
Forum: C++ Development
Topic: Dataview sample: adding items question [SOLVED]
Replies: 8
Views: 489

Re: Dataview sample: adding items question [SOLVED]

Following the suggestions I modified the code as follows: This is the function called when I click the Add item button, basically passing the selected item and the data to add void MyFrame::OnAdd(wxCommandEvent& WXUNUSED(event)) { wxDataViewItem selectedItem = m_ctrl->GetSelection(); m_music_mod...
by papillon68
Fri Oct 05, 2018 12:56 pm
Forum: C++ Development
Topic: Dataview sample: adding items question [SOLVED]
Replies: 8
Views: 489

Dataview sample: adding items question [SOLVED]

I'm studying and customizing the dataview sample but I can't figure out how to append items to a specific child or level. The relevant code section looks like this: m_root = new MyTreeCrownModelNode(NULL, "Root node" ); // 1st item m_root->Append(new MyTreeCrownModelNode (m_root,"Laye...
by papillon68
Wed Oct 03, 2018 9:09 pm
Forum: C++ Development
Topic: wxDataViewCtrl implementation failure
Replies: 9
Views: 184

Re: wxDataViewCtrl implementation failure

Found what was wrong, ashamed to say it was a wrong setting in the Visual Studio C/C++ Code Generation settings, where I set the /MTd flag rather than the /MD flag. So basically it was mixing non-debug libraries linking with debug ones. Result: application would start and silently shut down after fe...
by papillon68
Wed Oct 03, 2018 4:33 pm
Forum: C++ Development
Topic: wxDataViewCtrl implementation failure
Replies: 9
Views: 184

Re: wxDataViewCtrl implementation failure

Ok so thanks to all responses I managed to get a step further and understand at least the issues. Latest problem about the unresolved external symbol was simply the wxmsw31u_adv.lib dependency missing. The problem of the application shutting down silently, both in debug and release mode, is produced...
by papillon68
Wed Oct 03, 2018 1:23 pm
Forum: C++ Development
Topic: wxDataViewCtrl implementation failure
Replies: 9
Views: 184

Re: wxDataViewCtrl implementation failure

Hello, first of all, thanks for the support, I really appreciate it. Windows 10, MS VC++ 2015, WxWidgets 3.11. Commenting the line out the program runs fine, but I was using 3.11 debug libraries. So now I switched to wxMSW-3.1.1_vc140_x64_Release libraries (so I'm using precompiled ones), and the li...
by papillon68
Tue Oct 02, 2018 10:37 pm
Forum: C++ Development
Topic: wxDataViewCtrl implementation failure
Replies: 9
Views: 184

wxDataViewCtrl implementation failure

Hello, I'd like to ask if there is a specific way to implement wxDataViewCtrl , as it is silently shutting down my application at startup just after its implementation. Here is a summary of my wxFrame constructor where I build all the UI elements successfully (besides the wxDataViewCtrl): MyFrame::M...
by papillon68
Sun Sep 30, 2018 9:41 pm
Forum: C++ Development
Topic: deleting node from wxList
Replies: 4
Views: 170

Re: deleting node from wxList

I'm coming from the Qt world (where I stationed briefly): at that time I was advised to use dedicated containers rather than standard ones, so for example QList would have been better (?) than using std::vec or other standard containers. Is this not the case with WxWidgets? I mean, is better if I go...
by papillon68
Sun Sep 30, 2018 2:52 pm
Forum: C++ Development
Topic: deleting node from wxList
Replies: 4
Views: 170

deleting node from wxList

Hi all, I want to delete a wxList node while iterating. My first attempt, which crashes, was like this: splineInventory::compatibility_iterator node = treeSplineInventory.GetFirst(); while (node) { CRSpline *currentSpline = node->GetData(); if (someCondition==true) treeSplineInventory.DeleteNode(nod...
by papillon68
Thu Sep 27, 2018 8:35 pm
Forum: C++ Development
Topic: wxImage to buffer and back [SOLVED]
Replies: 5
Views: 403

Re: wxImage to buffer and back [SOLVED]

Thank you very much PB, that works perfectly. I guess then the issue I had was not using malloc on the wxImage initialization. Will try that too...

Go to advanced search